package com.CM;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloCtrler {
    //@RequestMapping(method = RequestMethod.GET)
    @RequestMapping("/hellotext")
    @ResponseBody
    public String hellotext(ModelMap mod){
        return "HelloWorld!";
    }

    @RequestMapping("/helloabc")
    @ResponseBody
    public String helloabc(ModelMap mod){
        return "你好!";
    }

    @RequestMapping("/hellojsp")
    public String hellojsp(ModelMap mod){
        mod.addAttribute("msg", "HI!");
        return "hellojsp";
    }
}
